# !/usr/bin/env python
# encoding: utf-8


"""
  @author: gaogao
  @file: read_file.py
  @time: 2022/4/16 13:08
  @desc:
"""
from pathlib import Path


def get_all_file(file_path=None):
    root = Path(file_path)
    file_list = list(root.iterdir())
    if file_list:
        return file_list


def handle_file(file_list):
    result_list = []
    for file in file_list:
        if str(file).endswith(".py"):
            result_list.append(file.stem)
    return result_list

# file_path = r"D:\PyCharmProject\HC_ATS\plans\test"
# print(get_all_file(file_path))
